package com.cloudpivot.receivales.contract.service.impl;

import com.cloudpivot.receivales.contract.entity.erpcontract.Inventory;
import com.cloudpivot.receivales.contract.repository.erpcontract.InventoryRepository;
import com.cloudpivot.receivales.contract.service.InventoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 获取U8产品类别信息
 */
@Service
public class InventoryServiceImpl implements InventoryService {

    @Autowired
    private InventoryRepository inventoryRepository;

    @Override
    public Inventory getInventory(String cInvCode) {
        return inventoryRepository.getcInvCCode(cInvCode);
    }

    /**
     * 数据库获取erp 产品单位
     * @param cInvCode
     * @return
     */
    public String getInvUnit(String cInvCode) {
        return inventoryRepository.getInvUnit(cInvCode);

    }
}
